package com.example.demo;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.transaction.annotation.EnableTransactionManagement;

@SpringBootApplication
//@EnableAutoConfiguration(exclude={
//		DataSourceAutoConfiguration.class,
//		DataSourceTransactionManagerAutoConfiguration.class //如果mybatis 中serviceImpl 实加入事务注解 则需要打开事务开关
//})
@EnableTransactionManagement //如果mybatis 中serviceImpl 实加入事务注解 则需要打开事务开关
@ComponentScan("com.example.demo") //扫描容器
public class JSpringDemoApplication {

	public static void main(String[] args) {
		SpringApplication.run(JSpringDemoApplication.class, args);
	}

}
